package com.example.demo.springboot.mqclient.consumer;

import lombok.Data;

/**
 * MqConsumerConstant:消费者枚举[这里按照一个服务一个消费端枚举]
 * 常量=项目.业务.模式.[交换机/队列/路由key]
 * 列举几种常见的模型,使用电话拨打后推送话单的这个业务场景进行MQ操作
 * <a href="https://blog.csdn.net/qq_44981526/article/details/129334375">参考</a>
 *
 * @author zhangxiaoxiang
 * @since 2023/10/11
 */
@Data
public class MqConsumerConstant {

    /**
     * direct 路由模式 [对接MQ只需要双方约定队列名称就行] 话单回调消费示例
     * 外呼话单
     */
    public static final String DIRECT_CALLLOG_EXCHANGE = "outbound.calllog.direct.exchange";
    public static final String DIRECT_CRM_CALLLOG_QUEUE = "outbound.calllog.crm.direct.queue";
    public static final String DIRECT_ZHIYU_CALLLOG_QUEUE = "outbound.calllog.zhiyu.direct.queue";
    public static final String DIRECT_CRM_CALLLOG_KEY = "outbound.calllog.crm.key";
    public static final String DIRECT_ZHIYU_CALLLOG_KEY = "outbound.calllog.zhiyu.key";



    /**
     * fanout 话单回调消费示例[对接MQ只需要双方约定交换机名称就行]
     * 外呼话单
     */
    public static final String FANOUT_CALLLOG_EXCHANGE = "outbound.calllog.fanout.exchange";
    // 接收广播的队列[名称由监听方自己指定就行]
    public static final String FANOUT_CRM_CALLLOG_QUEUE = "outbound.crm.calllog.fanout.queue";
    public static final String FANOUT_ZHIYU_CALLLOG_QUEUE = "outbound.zhiyu.calllog.fanout.queue";


    /**
     * topic 处理话单
     * crm话单回调消费示例[对接MQ时,双方约定交换机名称,队列名称(消费端可以一致或者不一致),路由key满足条件即可xxx.*或者xxx.#]
     * 外呼话单TOPIC模式[交换机/队列/key]
     */
    // 外呼话单交换机
    public static final String TOPIC_CALLLOG_EXCHANGE = "outbound.calllog.topic.exchange";
    // 话单回调队列
    public static final String CRM_CALLLOG_QUEUE = "outbound.crm.calllog.topic.queue";
    // 多个写在消费端的key上


    public static final String ZHIYU_CALLLOG_QUEUE = "outbound.zhiyu.calllog.topic.queue";
    // 匹配单个字节写在常量池
    public static final String ZHIYU_CALLLOG_KEY = "callback.zhiyu.*";

}
